<?php

declare(strict_types=1);

namespace App\Model;

use Illuminate\Database\Eloquent\Model;

/**
 * 用户专访
 */
class UserQa extends Model
{
    protected $table = 'user_qa';
    protected $fillable = ['user_id', 'question_id', 'answer', 'flag'];

    public function userprofile()
    {
        return $this->belongsTo(UserProfile::class, 'user_id', 'user_id');
    }

    public function question()
    {
        return $this->belongsTo(SettingUserQuestion::class, 'question_id', 'id');
    }
}
